home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Tele
/
R
/
Ringcounter
< prev
next >
Wrap
Text File
|
1987-12-07
|
2KB
|
93 lines
(This short procedure can be run while your computer
(is unattended and will count all of the RINGs that
(are echoed to the screen display. The procedure
(will recycle after 5 seconds of no RINGs. The
(info is automatically written to an existing file called
(CALLS on the Disk COM. Of course this can be
(changed to fit your needs
(To use this procedure, your modem must be set so
(that it echos a RING to your screen each time your
(computer line receives a ring
(Start procedure
:BEGIN
CLEAR
TYPE ^M
TYPE ^M
TYPE ^M
TYPE No incoming calls detected^M
TYPE <Q> to Quit^M
:START
PAUSE 120
ALERT1 Q/JUMPTO END
ALERT2 q/JUMPTO END
ALERT3 X/JUMPTO BEGIN
PROMPT RING
LET EQUAL R%,1
(Count rings and set default timeout to 15 seconds
:RING
PANICAFTER 15
ONPANIC JUMPTO TIME
PROMPT RING
ADD R%,1
JUMPTO RING
(Get time and date in correct formats)
:TIME
GETGLOBAL O%,5
GETGLOBAL D%,6
GETGLOBAL H%,8
GETGLOBAL M%,9
TEST H% > 12
IF YES LET EQUAL Y%,1
IF NO LET EQUAL Y%,0
IF YES SUBTRACT H%,12
TEST M% < 10
IF YES COPYINTO T$,0
NUMTOSTRING M%,M$
IF YES CONCAT T$,M$
IF YES COPYINTO M$,T$
NUMTOSTRING H%,H$
NUMTOSTRING R%,R$
NUMTOSTRING O%,O$
NUMTOSTRING D%,D$
(Type screen display)
CLEAR
TYPE O$
TYPE /
TYPE D$
TYPE --
TYPE H$
TYPE :
TYPE M$
TEST Y% = 1
IF YES TYPE P.M.
TYPE You had
TYPE R$
TYPE Ring(s)
TYPE ^M
(Send information to disk
USEROPENA 1,COM:CALLS
GETLINE 1,W$
PAUSE 120
CLEAR
TYPE ^M
TYPE ^M
TYPE ^M
TYPE Incoming Call(s) detected^M
TYPE <Q> to Quit^M
TYPE <X> to Reset ^M
USERWRITE 1,W$
USERWRCR 1
USERCLOSE 1
(Recycle)
JUMPTO START
:END
CLEAR
END